<div class="row searchLineWrap">
	<form id="reservationForm" name="reservationForm" action="${cxt!}/upcoming/events/activityRegistration/${reservationId!}" method="post" class="form-horizontal">
	<input type="hidden" name="reservationid" id="reservationid" value="${reservationId!}">
		<div class="col-lg-12">
			<div class="row">
				<div class="col-md-4">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["upcoming.events.reservation.name"]}</label>
						<div class="col-md-7">
							<input type="text" class="form-control" name="upcomingEventsReservation.l_fullname" placeholder="${_res['upcoming.events.reservation.name']}" value="${paramMap['upcomingEventsReservation.l_fullname']}" />
						</div>
					</div>
				</div>
				<div class="col-md-4">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["upcoming.events.reservation.contactNumber"]}</label>
						<div class="col-md-7">
							<input type="text" class="form-control" name="upcomingEventsReservation.l_contactNumber" placeholder="${_res['upcoming.events.reservation.contactNumber']}" value="${paramMap['upcomingEventsReservation.l_contactNumber']}" />
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-md-4">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["upcoming.events.reservation.email"]}</label>
						<div class="col-md-7">
							<input type="text" class="form-control" name="upcomingEventsReservation.l_email" placeholder="${_res['upcoming.events.reservation.email']}" value="${paramMap['upcomingEventsReservation.l_email']}" />
						</div>
					</div>
				</div>
				
				
				<div class="col-md-4">
					<div class="form-group">
						<% if(hasPrivilegeUrl("activityRegistration")){ %>
							<button type="button" class="btn btn-primary pull-right" onclick="ajaxForm('content','reservationForm')">
								<i class="fa fa-search m-l-sm m-r-xs"></i>${_res["system.search"]}
							</button> 
						<% } %>
					</div>
				</div>
			</div>
		</div>
	</form>
</div>

<div class="row searchLineWrap">

	<% if(hasPrivilegeUrl("upcomingEventsExport")){ %>
		<p><a href="javascript:void(0);" onClick="downloadReservation();" class="btn btn-primary pull-left">${_res["system.export"]}</a><div class="clearfix"></div></p>
	<% } %>
	
	<table class="table table-bordered" id="list-table">
		<thead>
			<tr>
				<th>${_res["upcoming.events.reservation.eventsid"]}</th>
				<th>${_res["upcoming.events.reservation.name"]}</th>
				<th>${_res["upcoming.events.reservation.contactNumber"]}</th>
				<th>${_res["upcoming.events.reservation.email"]}</th>
				<th>${_res["upcoming.events.reservation.isgrei"]}</th>
				<th>${_res["upcoming.events.reservation.attendeeNumber"]}</th>
				<th>${_res["upcoming.events.reservation.specialRequirement"]}</th>
				<th>${_res["upcoming.events.reservation.reservationTime"]}</th>
			</tr>
		</thead>
		<tbody>
			<% for(reservation in splitPage.list!){ %>
				<tr>
					<td style="background-color: rgb(255, 255, 255);padding: 12px 8px;">${reservation.title!}</td>
					<td style="background-color: rgb(255, 255, 255);padding: 12px 8px;">${reservation.fullname!}</td>
					<td style="background-color: rgb(255, 255, 255);padding: 12px 8px;">${reservation.contactNumber!}</td>
					<td style="background-color: rgb(255, 255, 255);padding: 12px 8px;">${reservation.email!}</td>
					<td style="background-color: rgb(255, 255, 255);padding: 12px 8px;">
						<#dict type="lable" value="${reservation.isgrei!}" name="reservation.isgrei" dictCode="COMMON_YN" /></td>
					<td style="background-color: rgb(255, 255, 255);padding: 12px 8px;">${reservation.attendeeNumber!}</td>
					<td style="background-color: rgb(255, 255, 255);padding: 12px 8px;">${reservation.specialRequirement!}</td>
					<td style="background-color: rgb(255, 255, 255);padding: 12px 8px;">${reservation.reservationTime!,dateFormat="yyyy-MM-dd HH:mm"}</td>
 				</tr>
			<% } %>
		</tbody>
	</table>
	<div id="splitPageDiv"><#page formId="reservationForm" /></div>
	<#nav />
</div>

<script>
	 function downloadReservation(){
		var id = $("#reservationid").val();
	    var url = "/upcoming/events/export?id="+id;
	    var data = "filename=upcomingEventsReservation";
	    ajaxDownload(url,"reservationForm",data);
	    return true;
	  };
</script>